import store from '@/store/index'
import * as mutationsTypes from '@/store/mutations-types'

//登录注册的路由
export default [
  {
    path: '/couponList',
    name: 'couponList',
    component: () => import('@/views/coupon/coupon_list/couponList'),
    beforeEnter: (to, from, next) => {
      console.log('从哪儿来: ' + from.path)
      console.log('到哪儿去: ' + to.path)
      window.document.title = '优惠'
      store.commit(mutationsTypes.EXCHANGE_HOME_NAV_ACTIVE_INDEX, '5')
      next()
    }
  },
  {
    path: '/goodsDetail',
    name: 'goodsDetail',
    component: () => import('@/views/coupon/detail/GoodsDetail'),
  }
]
